package com.itheima.web.service.impl.ums;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.result.ResultData;
import com.itheima.service.ums.UmsMemberLevelService;
import com.itheima.vo.ums.UmsMemberLevel;
import com.itheima.web.mapper.ums.UmsMemberLevelMapper;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class UmsMemberLevelServiceImpl extends ServiceImpl<UmsMemberLevelMapper, UmsMemberLevel> implements UmsMemberLevelService {
    @Autowired
    private UmsMemberLevelMapper umsMemberLevelMapper;

    @Override
    public ResultData defaultStatusLiat(Integer defaultStatus) {
        LambdaQueryWrapper<UmsMemberLevel> lqw=new LambdaQueryWrapper<>();
        lqw.eq(UmsMemberLevel::getDefaultStatus,defaultStatus);
        List<UmsMemberLevel> list = umsMemberLevelMapper.selectList(lqw);
        return ResultData.ok("操作成功",list);
    }
}
